
		

-- D:\GOA\reslibrary\templete\res\modal\modalmgr.xsl 58
gr_module("gm_xinbanchunzhongyun")


mcgfoutitembommgr = inherit(GmSql.list,GmBase.CallBack):name("mcgfoutitembommgr")



mcgfoutitembommgr.init = function (self,pagecount)

	local top = self
	
	
	GmSql.list.init(self,gInfo["path"]..'/'..g_local_db_name,'czy_outitembom')
	GmBase.CallBack.init(self)
	
	self.baseurl = ''

	self.idPair = {}
	self.idPair['prev'] = '0'
	self.idPair['next'] = '0'
	
	self.pageCount = pagecount or 10
	self.totalPage = 0
	
	self:reset_maxminid('czy_outitembom','id')
	
	
	self.action = {}
	self.op  = {}
	
	
	
	-----------------------------
	self.action['cgfoutitembomdetail'] = {} 	
	-------
	self.op['cgfoutitembomdetail'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfoutitembomdetail()
		for a,b in pairs(top.action['cgfoutitembomdetail']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfoutitembomdetail(newpostparam)
		
	end	
		
  self.action['cgfoutitembomdetail']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomdetail']['order_id'] = { ['title'] = 'order_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomdetail']['thing_id'] = { ['title'] = 'thing_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomdetail']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '32' }	
  self.action['cgfoutitembomdetail']['pos'] = { ['title'] = 'pos' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '16' }	
  self.action['cgfoutitembomdetail']['size'] = { ['title'] = 'size' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomdetail']['count'] = { ['title'] = 'count' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomdetail']['unit'] = { ['title'] = '鍗曚' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '10' }	
  self.action['cgfoutitembomdetail']['cost'] = { ['title'] = 'cost' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '128' }	
  self.action['cgfoutitembomdetail']['item'] = { ['title'] = '鐗╂枡缂栧彿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfoutitembomdetail']['material_length'] = { ['title'] = 'material_length' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '13' }	
  self.action['cgfoutitembomdetail']['total'] = { ['title'] = '鏉愭枡缁熻锛岀敤浜庤嚜鍔ㄥ嚭搴?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomdetail']['color'] = { ['title'] = '鐗╂枡缂栧彿锛屼笌棰滆壊鏍囧畾鏉愭枡' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfoutitembomdetail']['priority'] = { ['title'] = 'priority' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomdetail']['spec'] = { ['title'] = 'spec' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfoutitembomdetail']['realtotal'] = { ['title'] = 'realtotal' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomdetail']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfoutitembomdetail']['ctype'] = { ['title'] = '鏉愭枡鍑哄簱鏂瑰紡,榛樿涓烘寜闀垮害,length=>闀垮害,count=>鏀暟' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomdetail']['is_auto'] = { ['title'] = '1涓鸿嚜鍔?0涓烘墜鍔?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }
  self.action['cgfoutitembomdetail']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfoutitembompost'] = {} 	
	-------
	self.op['cgfoutitembompost'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfoutitembompost()
		for a,b in pairs(top.action['cgfoutitembompost']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfoutitembompost(newpostparam)
		
	end	
		
  self.action['cgfoutitembompost']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembompost']['order_id'] = { ['title'] = 'order_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembompost']['thing_id'] = { ['title'] = 'thing_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembompost']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '32' }	
  self.action['cgfoutitembompost']['pos'] = { ['title'] = 'pos' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '16' }	
  self.action['cgfoutitembompost']['size'] = { ['title'] = 'size' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembompost']['count'] = { ['title'] = 'count' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembompost']['unit'] = { ['title'] = '鍗曚' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '10' }	
  self.action['cgfoutitembompost']['cost'] = { ['title'] = 'cost' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '128' }	
  self.action['cgfoutitembompost']['item'] = { ['title'] = '鐗╂枡缂栧彿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfoutitembompost']['material_length'] = { ['title'] = 'material_length' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '13' }	
  self.action['cgfoutitembompost']['total'] = { ['title'] = '鏉愭枡缁熻锛岀敤浜庤嚜鍔ㄥ嚭搴?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembompost']['color'] = { ['title'] = '鐗╂枡缂栧彿锛屼笌棰滆壊鏍囧畾鏉愭枡' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfoutitembompost']['priority'] = { ['title'] = 'priority' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembompost']['spec'] = { ['title'] = 'spec' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfoutitembompost']['realtotal'] = { ['title'] = 'realtotal' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembompost']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfoutitembompost']['ctype'] = { ['title'] = '鏉愭枡鍑哄簱鏂瑰紡,榛樿涓烘寜闀垮害,length=>闀垮害,count=>鏀暟' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembompost']['is_auto'] = { ['title'] = '1涓鸿嚜鍔?0涓烘墜鍔?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }
  self.action['cgfoutitembompost']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfoutitembommodify'] = {} 	
	-------
	self.op['cgfoutitembommodify'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfoutitembommodify()
		for a,b in pairs(top.action['cgfoutitembommodify']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfoutitembommodify(newpostparam)
		
	end	
		
  self.action['cgfoutitembommodify']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembommodify']['order_id'] = { ['title'] = 'order_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembommodify']['thing_id'] = { ['title'] = 'thing_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembommodify']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '32' }	
  self.action['cgfoutitembommodify']['pos'] = { ['title'] = 'pos' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '16' }	
  self.action['cgfoutitembommodify']['size'] = { ['title'] = 'size' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembommodify']['count'] = { ['title'] = 'count' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembommodify']['unit'] = { ['title'] = '鍗曚' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '10' }	
  self.action['cgfoutitembommodify']['cost'] = { ['title'] = 'cost' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '128' }	
  self.action['cgfoutitembommodify']['item'] = { ['title'] = '鐗╂枡缂栧彿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfoutitembommodify']['material_length'] = { ['title'] = 'material_length' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '13' }	
  self.action['cgfoutitembommodify']['total'] = { ['title'] = '鏉愭枡缁熻锛岀敤浜庤嚜鍔ㄥ嚭搴?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembommodify']['color'] = { ['title'] = '鐗╂枡缂栧彿锛屼笌棰滆壊鏍囧畾鏉愭枡' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfoutitembommodify']['priority'] = { ['title'] = 'priority' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembommodify']['spec'] = { ['title'] = 'spec' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfoutitembommodify']['realtotal'] = { ['title'] = 'realtotal' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembommodify']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfoutitembommodify']['ctype'] = { ['title'] = '鏉愭枡鍑哄簱鏂瑰紡,榛樿涓烘寜闀垮害,length=>闀垮害,count=>鏀暟' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembommodify']['is_auto'] = { ['title'] = '1涓鸿嚜鍔?0涓烘墜鍔?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }
  self.action['cgfoutitembommodify']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfoutitembomlist'] = {} 	
	-------
	self.op['cgfoutitembomlist'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfoutitembomlist()
		for a,b in pairs(top.action['cgfoutitembomlist']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfoutitembomlist(newpostparam)
		
	end	
		
  self.action['cgfoutitembomlist']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomlist']['order_id'] = { ['title'] = 'order_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomlist']['thing_id'] = { ['title'] = 'thing_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomlist']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '32' }	
  self.action['cgfoutitembomlist']['pos'] = { ['title'] = 'pos' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '16' }	
  self.action['cgfoutitembomlist']['size'] = { ['title'] = 'size' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomlist']['count'] = { ['title'] = 'count' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomlist']['unit'] = { ['title'] = '鍗曚' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '10' }	
  self.action['cgfoutitembomlist']['cost'] = { ['title'] = 'cost' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '128' }	
  self.action['cgfoutitembomlist']['item'] = { ['title'] = '鐗╂枡缂栧彿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfoutitembomlist']['material_length'] = { ['title'] = 'material_length' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '13' }	
  self.action['cgfoutitembomlist']['total'] = { ['title'] = '鏉愭枡缁熻锛岀敤浜庤嚜鍔ㄥ嚭搴?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomlist']['color'] = { ['title'] = '鐗╂枡缂栧彿锛屼笌棰滆壊鏍囧畾鏉愭枡' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfoutitembomlist']['priority'] = { ['title'] = 'priority' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomlist']['spec'] = { ['title'] = 'spec' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfoutitembomlist']['realtotal'] = { ['title'] = 'realtotal' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomlist']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfoutitembomlist']['ctype'] = { ['title'] = '鏉愭枡鍑哄簱鏂瑰紡,榛樿涓烘寜闀垮害,length=>闀垮害,count=>鏀暟' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomlist']['is_auto'] = { ['title'] = '1涓鸿嚜鍔?0涓烘墜鍔?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }
  self.action['cgfoutitembomlist']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfoutitembomitem'] = {} 	
	-------
	self.op['cgfoutitembomitem'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfoutitembomitem()
		for a,b in pairs(top.action['cgfoutitembomitem']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfoutitembomitem(newpostparam)
		
	end	
		
  self.action['cgfoutitembomitem']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomitem']['order_id'] = { ['title'] = 'order_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomitem']['thing_id'] = { ['title'] = 'thing_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomitem']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '32' }	
  self.action['cgfoutitembomitem']['pos'] = { ['title'] = 'pos' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '16' }	
  self.action['cgfoutitembomitem']['size'] = { ['title'] = 'size' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomitem']['count'] = { ['title'] = 'count' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomitem']['unit'] = { ['title'] = '鍗曚' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '10' }	
  self.action['cgfoutitembomitem']['cost'] = { ['title'] = 'cost' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '128' }	
  self.action['cgfoutitembomitem']['item'] = { ['title'] = '鐗╂枡缂栧彿' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfoutitembomitem']['material_length'] = { ['title'] = 'material_length' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '13' }	
  self.action['cgfoutitembomitem']['total'] = { ['title'] = '鏉愭枡缁熻锛岀敤浜庤嚜鍔ㄥ嚭搴?' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomitem']['color'] = { ['title'] = '鐗╂枡缂栧彿锛屼笌棰滆壊鏍囧畾鏉愭枡' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '64' }	
  self.action['cgfoutitembomitem']['priority'] = { ['title'] = 'priority' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfoutitembomitem']['spec'] = { ['title'] = 'spec' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '22' }	
  self.action['cgfoutitembomitem']['realtotal'] = { ['title'] = 'realtotal' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomitem']['note'] = { ['title'] = 'note' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfoutitembomitem']['ctype'] = { ['title'] = '鏉愭枡鍑哄簱鏂瑰紡,榛樿涓烘寜闀垮害,length=>闀垮害,count=>鏀暟' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfoutitembomitem']['is_auto'] = { ['title'] = '1涓鸿嚜鍔?0涓烘墜鍔?' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '1' }
  self.action['cgfoutitembomitem']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
  
 
  	
  
	self.session = {}
	
end   





mcgfoutitembommgr.check_fields_validate = function(self,key,postparam)
	local checkfunc = {}
	checkfunc['t'] = function(fm,value)
		return true
	end
	checkfunc['min'] = function(fm,value)
		if string.len(value) < tonumber(fm) then
			return false
		end
		return true
	end
	checkfunc['max'] = function(fm,value)
		if string.len(value) > tonumber(fm) then
			return false
		end
		return true
	end
	local format = self.action[key]
	for fkey,fvalue in pairs(postparam) do
		if format[fkey] ~= nil then
			for fmkey,fmvalue in pairs(format[fkey]) do
				if checkfunc[fmkey] ~= nil then
					if checkfunc[fmkey](fmvalue,fvalue) == false then
						return false,tostring(format[fkey]['title']).." "..tostring(fmkey).." "..tostring(fmvalue).." error"
					end
				end
			end
		end
	end
	return true,""
end 


 
mcgfoutitembommgr.get_session = function(self,key)
	if key == nil then
		key = 'default'
	end
	return self.session[key]
end

mcgfoutitembommgr.has_session = function(self,key)
	if key == nil then
		key = 'default'
	end
	return self.session[key] ~= nil
end
 
 
mcgfoutitembommgr.add_session = function(self,key,ses)
	self.session[key] = ses
end


mcgfoutitembommgr.add_ui = function(self,key,ui)
	self.uis[key] = ui
end




-- todo
mcgfoutitembommgr.run = function(self,key,ui)
	if self.action[key] ~= nil and self.op[key] ~= nil then
		local tb = {}
		for k,v in pairs(self.action[key]) do
			if ui[k] ~= nil and type(ui[k]) == 'table' and ui[k].get_text then
				tb[k] = ui[k]:get_text()
			else
				print('run error',key,k)
			end
		end
		local success,msg = self:check_fields_validate(key,tb)
		if success then
			self.op[key](tb,ui)
		else
			ui.hostWindow:showMsg(msg)
		end		
	else
		print('run error self.action',key)
	end
end


------------------------------------------------------------------------------------


mcgfoutitembommgr.get_net_page = function(self,netmethon,attrs)
	local top = self	
	local discuz = GmBase.net.get_instance()
	local methon = netmethon
	if methon ~= nil and discuz[methon] then
		print('mcgfoutitembommgr.get_net_page ',methon)
		local tbname,callbackey,tb = discuz[netmethon](discuz)
		for k,v in pairs(attrs) do
			tb[k] = attrs[k]
		end
		discuz[netmethon](discuz,tb)
	else
		print('mcgfoutitembommgr.get_net_page error ',methon)
	end		
end




mcgfoutitembommgr.get_prev_page = function(self,ui,callback)
	if ui.page ~= nil and type(ui.page) == 'number' then
		local uiattrs = ui:GetAttrs()
		local attrs = {}
		for a,b in pairs(self.action['cgfoutitembomlist']) do
			if type(uiattrs[a]) ~= nil then
				attrs[a] = uiattrs[a]
			end
		end
		attrs.page = ui.page - 1		

		if attrs.page < 1 then
			attrs.page = 1
		end

		self:get_net_page(ui.netmethon,attrs)
	end
end


mcgfoutitembommgr.get_next_page = function(self,ui,callback)
	if ui.page ~= nil and type(ui.page) == 'number' then
		local uiattrs = ui:GetAttrs()
		local attrs = {}
		for a,b in pairs(self.action['cgfoutitembomlist']) do
			if type(uiattrs[a]) ~= nil then
				attrs[a] = uiattrs[a]
			end
		end
		attrs.page = ui.page + 1
		self:get_net_page(ui.netmethon,attrs)
	end
end

------------------------------------------------------------------------------------



mcgfoutitembommgr.init_table = function(self)
	--[[
	local tablefield = {}
	
	--number
	tablefield['id'] = { ["i"] = 11, }
    
	--number
	tablefield['order_id'] = { ["i"] = 11, }
    
	--number
	tablefield['thing_id'] = { ["i"] = 11, }
    
	--string
	tablefield['name'] = { ["v"] = 32, }
    
	--string
	tablefield['pos'] = { ["v"] = 16, }
    
	--string
	tablefield['size'] = { ["v"] = 20, }
    
	--string
	tablefield['count'] = { ["v"] = 20, }
    
	--string
	tablefield['unit'] = { ["v"] = 10, }
    
	--string
	tablefield['cost'] = { ["v"] = 128, }
    
	--string
	tablefield['item'] = { ["v"] = 64, }
    
	--number
	tablefield['material_length'] = { ["i"] = 13, }
    
	--string
	tablefield['total'] = { ["v"] = 20, }
    
	--string
	tablefield['color'] = { ["v"] = 64, }
    
	--string
	tablefield['priority'] = { ["v"] = 11, }
    
	--string
	tablefield['spec'] = { ["v"] = 22, }
    
	--string
	tablefield['realtotal'] = { ["v"] = 20, }
    
	--string
	tablefield['note'] = { ["v"] = 255, }
    
	--string
	tablefield['ctype'] = { ["v"] = 20, }
    
	--number
	tablefield['is_auto'] = { ["i"] = 1, }
    
	self:create_table( self.tablename, tablefield)
	]]
	self:initTableStruct()
end


	